#include "RsGisLibCMDUtils.h"

RsGisLibCMDUtils::RsGisLibCMDUtils(RsgisPortal* Port)
{
	ClientPort = Port;

	rsgisUtiStretchImg = NULL;
	rsgisUtiStretchImgwithStats = NULL;
	rsgisUtiMaskImage = NULL;
	rsgisUtiCreateTiles = NULL;
	rsgisUtiPopuImgStats = NULL;
	rsgisUtiImageMosaic = NULL;
	rsgisUtiImageInclude = NULL;
	rsgisUtiImageIncluOver = NULL;
	rsgisUtiImageIncluOverview = NULL;
	rsgisUtiAssignProj = NULL;
	rsgisUtiAssignSpatialInfo = NULL;
	rsgisUtiCopyProj = NULL;
	rsgisUtiCopyProjSpatial = NULL;
	rsgisUtiStackImageBands = NULL;
	rsgisUtiImgRasterZonetoHDF = NULL;
	rsgisUtiImgBandRasterZonetoHDF = NULL;
	rsgisUtiSubset = NULL;
	rsgisUtiSubsetBox = NULL;
	rsgisUtiSubsettoPolys = NULL;
	rsgisUtiSubsettoImg = NULL;
	rsgisUtiSubsetImgBands = NULL;
	rsgisUtiCrtBlanImg = NULL;
	rsgisUtiCrtCopyBlanImg = NULL;
	rsgisUtiCrtCopyBlanImgVecEx = NULL;
	rsgisUtiStackStats = NULL;
	rsgisUtiProReguGridImg = NULL;
	rsgisUtiFiniteImgMask = NULL;
	rsgisUtiValidImgMask = NULL;
	rsgisUtiComImgSinIgnNoData = NULL;
	rsgisUtiPerfRandPxlSample = NULL;
	rsgisUtiPerfRandPxlSampleSmlPxlCnt = NULL;
	rsgisUtiPerfHCSPanSharp = NULL;
}

RsGisLibCMDUtils::~RsGisLibCMDUtils()
{
	if (rsgisUtiStretchImg)
		delete(rsgisUtiStretchImg);
	if (rsgisUtiStretchImgwithStats)
		delete(rsgisUtiStretchImgwithStats);
	if (rsgisUtiMaskImage)
		delete(rsgisUtiMaskImage);
	if (rsgisUtiCreateTiles)
		delete(rsgisUtiCreateTiles);
	if (rsgisUtiPopuImgStats)
		delete(rsgisUtiPopuImgStats);
	if (rsgisUtiImageMosaic)
		delete(rsgisUtiImageMosaic);
	if (rsgisUtiImageInclude)
		delete(rsgisUtiImageInclude);
	if (rsgisUtiImageIncluOver)
		delete(rsgisUtiImageIncluOver);
	if (rsgisUtiImageIncluOverview)
		delete(rsgisUtiImageIncluOverview);
	if (rsgisUtiAssignProj)
		delete(rsgisUtiAssignProj);
	if (rsgisUtiAssignSpatialInfo)
		delete(rsgisUtiAssignSpatialInfo);
	if (rsgisUtiCopyProj)
		delete(rsgisUtiCopyProj);
	if (rsgisUtiCopyProjSpatial)
		delete(rsgisUtiCopyProjSpatial);
	if (rsgisUtiStackImageBands)
		delete(rsgisUtiStackImageBands);
	if (rsgisUtiImgRasterZonetoHDF)
		delete(rsgisUtiImgRasterZonetoHDF);
	if (rsgisUtiImgBandRasterZonetoHDF)
		delete(rsgisUtiImgBandRasterZonetoHDF);
	if (rsgisUtiSubset)
		delete(rsgisUtiSubset);
	if (rsgisUtiSubsetBox)
		delete(rsgisUtiSubsetBox);
	if (rsgisUtiSubsettoPolys)
		delete(rsgisUtiSubsettoPolys);
	if (rsgisUtiSubsettoImg)
		delete(rsgisUtiSubsettoImg);
	if (rsgisUtiSubsetImgBands)
		delete(rsgisUtiSubsetImgBands);
	if (rsgisUtiCrtBlanImg)
		delete(rsgisUtiCrtBlanImg);
	if (rsgisUtiCrtCopyBlanImg)
		delete(rsgisUtiCrtCopyBlanImg);
	if (rsgisUtiCrtCopyBlanImgVecEx)
		delete(rsgisUtiCrtCopyBlanImgVecEx);
	if (rsgisUtiStackStats)
		delete(rsgisUtiStackStats);
	if (rsgisUtiProReguGridImg)
		delete(rsgisUtiProReguGridImg);
	if (rsgisUtiFiniteImgMask)
		delete(rsgisUtiFiniteImgMask);
	if (rsgisUtiValidImgMask)
		delete(rsgisUtiValidImgMask);
	if (rsgisUtiComImgSinIgnNoData)
		delete(rsgisUtiComImgSinIgnNoData);
	if (rsgisUtiPerfRandPxlSample)
		delete(rsgisUtiPerfRandPxlSample);
	if (rsgisUtiPerfRandPxlSampleSmlPxlCnt)
		delete(rsgisUtiPerfRandPxlSampleSmlPxlCnt);
	if (rsgisUtiPerfHCSPanSharp)
		delete(rsgisUtiPerfHCSPanSharp);

	rsgisUtiStretchImg = NULL;
	rsgisUtiStretchImgwithStats = NULL;
	rsgisUtiMaskImage = NULL;
	rsgisUtiCreateTiles = NULL;
	rsgisUtiPopuImgStats = NULL;
	rsgisUtiImageMosaic = NULL;
	rsgisUtiImageInclude = NULL;
	rsgisUtiImageIncluOver = NULL;
	rsgisUtiImageIncluOverview = NULL;
	rsgisUtiAssignProj = NULL;
	rsgisUtiAssignSpatialInfo = NULL;
	rsgisUtiCopyProj = NULL;
	rsgisUtiCopyProjSpatial = NULL;
	rsgisUtiStackImageBands = NULL;
	rsgisUtiImgRasterZonetoHDF = NULL;
	rsgisUtiImgBandRasterZonetoHDF = NULL;
	rsgisUtiSubset = NULL;
	rsgisUtiSubsetBox = NULL;
	rsgisUtiSubsettoPolys = NULL;
	rsgisUtiSubsettoImg = NULL;
	rsgisUtiSubsetImgBands = NULL;
	rsgisUtiCrtBlanImg = NULL;
	rsgisUtiCrtCopyBlanImg = NULL;
	rsgisUtiCrtCopyBlanImgVecEx = NULL;
	rsgisUtiStackStats = NULL;
	rsgisUtiProReguGridImg = NULL;
	rsgisUtiFiniteImgMask = NULL;
	rsgisUtiValidImgMask = NULL;
	rsgisUtiComImgSinIgnNoData = NULL;
	rsgisUtiPerfRandPxlSample = NULL;
	rsgisUtiPerfRandPxlSampleSmlPxlCnt = NULL;
	rsgisUtiPerfHCSPanSharp = NULL;
}

void RsGisLibCMDUtils::UtiStretchImg()
{
	rsgisUtiStretchImg = new RsGisLibUtiStretchImg(ClientPort, NULL);
	rsgisUtiStretchImg->show();
}

void RsGisLibCMDUtils::UtiStretchImgwithStats()
{
	rsgisUtiStretchImgwithStats = new RsGisLibUtiStretchImgwithStats(ClientPort, NULL);
	rsgisUtiStretchImgwithStats->show();
}

void RsGisLibCMDUtils::UtiMaskImage()
{
	rsgisUtiMaskImage = new RsGisLibUtiMaskImage(ClientPort, NULL);
	rsgisUtiMaskImage->show();
}

void RsGisLibCMDUtils::UtiCreateTiles()
{
	rsgisUtiCreateTiles = new RsGisLibUtiCreateTiles(ClientPort, NULL);
	rsgisUtiCreateTiles->show();
}

void RsGisLibCMDUtils::UtiPopuImgStats()
{
	rsgisUtiPopuImgStats = new RsGisLibUtiPopuImgStats(ClientPort, NULL);
	rsgisUtiPopuImgStats->show();
}

void RsGisLibCMDUtils::UtiImageMosaic()
{
	rsgisUtiImageMosaic = new RsGisLibUtiImageMosaic(ClientPort, NULL);
	rsgisUtiImageMosaic->show();
}

void RsGisLibCMDUtils::UtiImageInclude()
{
	rsgisUtiImageInclude = new RsGisLibUtiImageInclude(ClientPort, NULL);
	rsgisUtiImageInclude->show();
}

void RsGisLibCMDUtils::UtiImageIncluOver()
{
	rsgisUtiImageIncluOver = new RsGisLibUtiImageIncluOver(ClientPort, NULL);
	rsgisUtiImageIncluOver->show();
}

void RsGisLibCMDUtils::UtiImageIncluOverview()
{
	rsgisUtiImageIncluOverview = new RsGisLibUtiImageIncluOverview(ClientPort, NULL);
	rsgisUtiImageIncluOverview->show();
}

void RsGisLibCMDUtils::UtiAssignProj()
{
	rsgisUtiAssignProj = new RsGisLibUtiAssignProj(ClientPort, NULL);
	rsgisUtiAssignProj->show();
}

void RsGisLibCMDUtils::UtiAssignSpatialInfo()
{
	rsgisUtiAssignSpatialInfo = new RsGisLibUtiAssignSpatialInfo(ClientPort, NULL);
	rsgisUtiAssignSpatialInfo->show();
}

void RsGisLibCMDUtils::UtiCopyProj()
{
	rsgisUtiCopyProj = new RsGisLibUtiCopyProj(ClientPort, NULL);
	rsgisUtiCopyProj->show();
}

void RsGisLibCMDUtils::UtiCopyProjSpatial()
{
	rsgisUtiCopyProjSpatial = new RsGisLibUtiCopyProjSpatial(ClientPort, NULL);
	rsgisUtiCopyProjSpatial->show();
}

void RsGisLibCMDUtils::UtiStackImageBands()
{
	rsgisUtiStackImageBands = new RsGisLibUtiStackImageBands(ClientPort, NULL);
	rsgisUtiStackImageBands->show();
}

void RsGisLibCMDUtils::UtiImgRasterZonetoHDF()
{
	rsgisUtiImgRasterZonetoHDF = new RsGisLibUtiImgRasterZonetoHDF(ClientPort, NULL);
	rsgisUtiImgRasterZonetoHDF->show();
}

void RsGisLibCMDUtils::UtiImgBandRasterZonetoHDF()
{
	rsgisUtiImgBandRasterZonetoHDF = new RsGisLibUtiImgBandRasterZonetoHDF(ClientPort, NULL);
	rsgisUtiImgBandRasterZonetoHDF->show();
}

void RsGisLibCMDUtils::UtiSubset()
{
	rsgisUtiSubset = new RsGisLibUtiSubset(ClientPort, NULL);
	rsgisUtiSubset->show();
}

void RsGisLibCMDUtils::UtiSubsetBox()
{
	rsgisUtiSubsetBox = new RsGisLibUtiSubsetBox(ClientPort, NULL);
	rsgisUtiSubsetBox->show();
}

void RsGisLibCMDUtils::UtiSubsettoPolys()
{
	rsgisUtiSubsettoPolys = new RsGisLibUtiSubsettoPolys(ClientPort, NULL);
	rsgisUtiSubsettoPolys->show();
}

void RsGisLibCMDUtils::UtiSubsettoImg()
{
	rsgisUtiSubsettoImg = new RsGisLibUtiSubsettoImg(ClientPort, NULL);
	rsgisUtiSubsettoImg->show();
}

void RsGisLibCMDUtils::UtiSubsetImgBands()
{
	rsgisUtiSubsetImgBands = new RsGisLibUtiSubsetImgBands(ClientPort, NULL);
	rsgisUtiSubsetImgBands->show();
}

void RsGisLibCMDUtils::UtiCrtBlanImg()
{
	rsgisUtiCrtBlanImg = new RsGisLibUtiCrtBlanImg(ClientPort, NULL);
	rsgisUtiCrtBlanImg->show();
}

void RsGisLibCMDUtils::UtiCrtCopyBlanImg()
{
	rsgisUtiCrtCopyBlanImg = new RsGisLibUtiCrtCopyBlanImg(ClientPort, NULL);
	rsgisUtiCrtCopyBlanImg->show();
}

void RsGisLibCMDUtils::UtiCrtCopyBlanImgVecEx()
{
	rsgisUtiCrtCopyBlanImgVecEx = new RsGisLibUtiCrtCopyBlanImgVecEx(ClientPort, NULL);
	rsgisUtiCrtCopyBlanImgVecEx->show();
}

void RsGisLibCMDUtils::UtiStackStats()
{
	rsgisUtiStackStats = new RsGisLibUtiStackStats(ClientPort, NULL);
	rsgisUtiStackStats->show();
}

void RsGisLibCMDUtils::UtiProReguGridImg()
{
	rsgisUtiProReguGridImg = new RsGisLibUtiProReguGridImg(ClientPort, NULL);
	rsgisUtiProReguGridImg->show();
}

void RsGisLibCMDUtils::UtiFiniteImgMask()
{
	rsgisUtiFiniteImgMask = new RsGisLibUtiFiniteImgMask(ClientPort, NULL);
	rsgisUtiFiniteImgMask->show();
}

void RsGisLibCMDUtils::UtiValidImgMask()
{
	rsgisUtiValidImgMask = new RsGisLibUtiValidImgMask(ClientPort, NULL);
	rsgisUtiValidImgMask->show();
}

void RsGisLibCMDUtils::UtiComImgSinIgnNoData()
{
	rsgisUtiComImgSinIgnNoData = new RsGisLibUtiComImgSinIgnNoData(ClientPort, NULL);
	rsgisUtiComImgSinIgnNoData->show();
}

void RsGisLibCMDUtils::UtiPerfRandPxlSample()
{
	rsgisUtiPerfRandPxlSample = new RsGisLibUtiPerfRandPxlSample(ClientPort, NULL);
	rsgisUtiPerfRandPxlSample->show();
}

void RsGisLibCMDUtils::UtiPerfRandPxlSampleSmlPxlCnt()
{
	rsgisUtiPerfRandPxlSampleSmlPxlCnt = new RsGisLibUtiPerfRandPxlSampleSmlPxlCnt(ClientPort, NULL);
	rsgisUtiPerfRandPxlSampleSmlPxlCnt->show();
}

void RsGisLibCMDUtils::UtiPerfHCSPanSharp()
{
	rsgisUtiPerfHCSPanSharp = new RsGisLibUtiPerfHCSPanSharp(ClientPort, NULL);
	rsgisUtiPerfHCSPanSharp->show();
}